﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using The_Square_Saga.Screens.Interface;
using The_Square_Saga.Objects;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Input;
using The_Square_Saga.Utils;
using The_Square_Saga.Levels;
using The_Square_Saga.Levels.Editor;

namespace The_Square_Saga.Screens
{
    class GameScreen : Screen, IScreen
    {
        private Dante dante;

        private LevelEditor editor;
        private Level level;
        private GameWindow gameWindow;

        public GameScreen(Texture2D background, GameWindow gameWindow)
            : base(background)
        {
            this.gameWindow = gameWindow;
        }

        public override void load(ContentManager content)
        {
            editor = new LevelEditor(content);

            level = new Level(1, new Vector2(800,800), content);

            Texture2D danteImg = content.Load<Texture2D>("Images\\Dante\\dante_test");
            

            dante = new Dante(danteImg, new Vector2(50, 430), new Vector2(2,2));
            
        }
        
        public override void update(GameTime gameTime, GameWindow Window)
        {
            dante.update(gameTime);
        }

        public override void draw(SpriteBatch spriteBatch)
        {
            level.draw(spriteBatch);
            dante.draw(spriteBatch);


        }
    }
}
